package demo6;

import javax.swing.table.TableColumn;

import org.omg.Messaging.SyncScopeHelper;
public class java006 {
	public static void main(String[] args) {
		FB fizzBuzz = new FB(20);
		Thread t1 = new Thread(()->{
				try {
					fizzBuzz.fizz(()->System.out.print("fizz, "));
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
			}
			);
		Thread t2 = new Thread(()->{
			try {
				fizzBuzz.buzz(()->System.out.print("buzz, "));
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		});
		Thread t3 = new Thread(()->{
			try {
				fizzBuzz.fizzbuzz(()->System.out.print("fizzbuzz, "));
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		});
		Thread t4 = new Thread(()->{
			try {
				fizzBuzz.number((number)->System.out.print(number+", "));
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		});
		t1.start();
		t2.start();
		t3.start();
		t4.start();
	}
}
